package com.sky.controller.user;

import com.sky.controller.common.CommonShopController;
import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController("userShopController")
@RequestMapping("/user/shop")
@Api(tags = "店铺相关接口")
public class ShopController {

    private final CommonShopController commonShopController;

    @Autowired
    public ShopController(CommonShopController commonShopController) {
        this.commonShopController = commonShopController;
    }



    /**
     * 查看店铺状态
     * @return Result
     */
    @GetMapping("/status")
    @ApiOperation("获取店铺的营业状态")
    public Result<Integer> getStatus(){
        log.info("执行 用户端查看营业状态 接口");
        return commonShopController.getStatus();
    }
}
